package cn.darkhorse.device.pojo;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 设备台账表
 * </p>
 *
 * @author yuanjun
 * @since 2023-10-08
 */
@Getter
@Setter
@TableName("mes_device")
@ApiModel(value = "MesDevice对象", description = "设备台账表")
public class MesDevice implements Serializable, TransPojo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("所属部门")
    private Long dept;

    @TableField(exist = false)
    private String deptName;


    @ApiModelProperty("设备编号")
    private String code;

    @ApiModelProperty("设备类型")
//    @Trans(type = TransType.SIMPLE,target = MesDeviceType.class,fields = "typeName" ,alias = "typeName")
    private Long type;

    @TableField(exist = false)
    private String typeName;


    @ApiModelProperty("设备名称")
    private String name;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("规格/型号")
    private String model;

    @ApiModelProperty("设备负责人")
    private Long header;

    @ApiModelProperty("维修负责人")
    private Long repairHeader;

    @ApiModelProperty("保养负责人")
    private Long upkeepHeader;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("作业人员")
    private String operator;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("作业人员id")
    private Long operatorId;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("作业人员手机号")
    private String operatorMobile;

    @ApiModelProperty("车牌号")
    private String carNumber;

    @ApiModelProperty("车品牌")
    @Trans(type = TransType.DICTIONARY,key = "car_brand")
    private String carBrand;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("通讯卡号")
    private String cardNumber;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("通讯流量")
    private String traffic;

    @ApiModelProperty("是否安装")
    private Integer isInstall;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("机主姓名")
    private String hostName;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("机主电话")
    private String hostTel;


    @ApiModelProperty("制单人")
    private Long creator;

    @ApiModelProperty("创建时间")
    private LocalDateTime gmtCreate;

    @ApiModelProperty("修改时间")
    private LocalDateTime gmtModify;

    @ApiModelProperty("设备状态（0：闲置1：启用）")
    @Trans(type = TransType.DICTIONARY,key = "machine_type")
    private Integer deviceStatus;

    @ApiModelProperty("状态 0 正常 1 离线")
    private Integer status;

    @ApiModelProperty("制单部门")
    private Long creatorDept;

    @ApiModelProperty(" 制单日期")
    private LocalDateTime creatorDate;


    @ApiModelProperty("图片附件")
    private String pictures;


    @ApiModelProperty("报警通知人")
    private String alarmNotifier;

    @ApiModelProperty("设备硬件对应id")
    //@TableField(updateStrategy = FieldStrategy.IGNORED)
    private String gatewayDeviceId;

    @ApiModelProperty("设备运行状态（0：设备运行/设备启动1：设备异常2：设备掉线3：设备暂停）")
    private Integer deviceRunningStatus;

    @ApiModelProperty("设备在线状态 （0离线 1在线）")
    private Boolean deviceOnline;
    @ApiModelProperty("使用状况0：在用1：待检2：待修3：报废4：停用")
    private Integer usageStatus;
    @TableField(exist = false)
    @ApiModelProperty("使用状况0：在用1：待检2：待修3：报废4：停用")
    private String usageStatusName;

    @ApiModelProperty("设备历史表名")
    private String historyTableName;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("所在地区")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String region;

    @ApiModelProperty("司机")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String driver;

    @ApiModelProperty("电话")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String telephone;

    @ApiModelProperty("经度")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String longitude;

    @ApiModelProperty("纬度")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String latitude;

    @ApiModelProperty("速度")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String speed;

    @ApiModelProperty("方向")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String direction;

    @ApiModelProperty("面积")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String area;

    @ApiModelProperty("采棉机状态")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String pickerStatus;

    @ApiModelProperty("GPS时间")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String gpsTime;




}
